--创建序列
create sequence no_seq;
--创建表
create table tenvinfo (
e_no      number(11) PRIMARY KEY,
e_name      varchar2(40),
e_ywdb      varchar2(100),
e_zjdb      varchar2(100),
e_url     varchar2(200),
e_version   varchar2(100),
e_updatetime  date,
e_seeurl    varchar2(300),
e_webserveraddr      varchar2(200),
e_weblogpath         varchar2(200),
e_memo               varchar2(200),
);
-- 添加注释
comment on table tenvinfo is '环境信息表';
comment on column tenvinfo.e_no is '编号';
comment on column tenvinfo.e_name is '环境别名';
comment on column tenvinfo.e_ywdb is '业务库';
comment on column tenvinfo.e_zjdb is '中间库';
comment on column tenvinfo.e_url is '访问地址';
comment on column tenvinfo.e_version is '版本号';
comment on column tenvinfo.e_updatetime is '更新时间';
comment on column tenvinfo.e_seeurl is 'see平台地址';
comment on column tenvinfo.e_webserveraddr is 'web服务地址';
comment on column tenvinfo.e_weblogpath is 'web日志路径';
--创建触发器
CREATE OR REPLACE TRIGGER tenvinfo_trigger
  BEFORE INSERT ON tenvinfo
  FOR EACH ROW
BEGIN
  SELECT no_seq.NEXTVAL INTO :new.e_no FROM dual;
END;